home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
Menu
/
c
/
GetText
< prev
next >
Wrap
Text File
|
1995-07-08
|
1KB
|
38 lines
/*
#### # # # #
# # # # # The FreeWare C library for
# # ## ### # # # # ### RISC OS machines
# # # # # # # # # # # ___________________________________
# # #### ### ## # # # #
# # # # # # # # # # Please refer to the accompanying
#### ### #### # # ##### # ### documentation for conditions of use
________________________________________________________________________
File: Menu.GetText.c
Author: Copyright © 1993 Jason Howat
Version: 1.00 (13 Dec 1993)
Purpose: Gets the address of the text in a menu item
*/
#include <string.h>
#include <stdlib.h>
#include "DeskLib:Wimp.h"
#include "DeskLib:Menu.h"
char *Menu_GetText(menu_ptr menu, int entry)
{
char *text;
menu_item *item = (menu_item*) (((int) menu) + sizeof(menu_block));
item = &item[entry];
if (item->iconflags.data.indirected)
text = item->icondata.indirecttext.buffer;
else
text = item->icondata.text;
return text;
}